QueryServiceStatusEx (advapi32)
Last changed: -193.128.29.5

.
Summary
The QueryServiceStatusEx function retrieves the current status of the specified service based on the specified information level.

C# Signature:

[DllImport("advapi32.dll", CharSet=CharSet.Unicode, SetLastError=true)]
public static extern unsafe bool QueryServiceStatusEx(IntPtr serviceHandle, int infoLevel, IntPtr buffer, int bufferSize, out int bytesNeeded);

VB Signature:

TODO

User-Defined Types:

None.

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

See SERVICE_STATUS definition.

See OpenService to get the hService.

None.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Documentation
Summary
The QueryServiceStatus function retrieves the current status of the specified service.

C# Signature:

[DllImport("advapi32.dll", EntryPoint = "QueryServiceStatus", CharSet = CharSet.Auto)]
public static extern bool QueryServiceStatus(IntPtr hService,ref SERVICE_STATUS dwServiceStatus);

VB.NET Signature:

<Runtime.InteropServices.DllImport("advapi32.dll", CharSet:=Runtime.InteropServices.CharSet.Auto, SetLastError:=True)> _
Public Shared Function QueryServiceStatus(ByVal hService As IntPtr, ByRef dwServiceStatus As SERVICE_STATUS) As Boolean
End Function

VB Signature:

Declare Function QueryServiceStatus Lib "advapi32.dll" (TODO) As TODO

User-Defined Types:

None.

Notes:

See SERVICE_STATUS definition.

See OpenService to get the hService.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Alternative Managed API:

Do you know one? Please contribute it!

Documentation